1. Field of the Invention
The present invention relates in general to video encoding, and more specifically to a system and method of selecting the coding method for the macroblocks of a video frame.
2. Description of the Related Art
The Advanced Video Coding (AVC) standard, Part 10 of MPEG4 (Motion Picture Experts Group), otherwise known as H.264, includes advanced compression techniques that were developed to enable transmission of video signals at a lower bit rate or storage of video signals using less storage space. The newer standard outperforms video compression techniques of prior standards in order to support higher quality streaming video at lower bit-rates and to enable internet-based video and wireless applications and the like. The standard does not define the CODEC (encoder/decoder pair) but instead defines the syntax of the encoded video bitstream along with a method of decoding the bitstream. Each video frame is subdivided and encoded at the macroblock (MBs) level, where each MB is a 16×16 block of pixels. Each MB is encoded in ‘intraframe’ mode in which a prediction MB is formed based on reconstructed MBs in the current frame, or ‘interframe’ mode in which a prediction MB is formed based on the MBs of the reference frames. The intraframe coding mode applies spatial information within the current frame in which the prediction MB is formed from samples in the current frame that have previously encoded, decoded and reconstructed. The interframe coding mode utilizes temporal information from previous and/or future reference frames to estimate motion to form the prediction MB.
A so-called “Reference CODEC”, such as according to JM85 of the JVT (Joint Video Team) of ISO/ITU, incorporates a method of making coding mode decisions for the encoder. The Reference CODEC is computationally intensive since it performs both interframe and intraframe coding, calculates bit-rate and distortion for each coding result, and selects the coding method having superior bit-rate and distortion. The Reference CODEC encoding process involves computationally intensive block transform and quantization of a residual or difference block for each interframe and intraframe coding method. The Reference CODEC encoding process further requires real rate and distortion calculations for each method in which distortion is determined from the reconstructed MB and the rate is the bit-rate necessary for coding the MB. Although this potentially achieves optimal results, the Reference CODEC encoding process consumes valuable resources and is not considered a practicable solution for many applications. For example, the computationally expensive intraframe prediction process is performed for each MB even if the intraframe coding method is rejected.
The complexity of the encoder is a bottleneck for multimedia applications using video, especially in wireless and mobile devices in which the computing and power resources are limited. It is desired to simplify the mode decision and balance the interframe and intraframe coding decisions to conserve resources while providing acceptable coding efficiency and visual quality. It is desired to provide a suitable mode decision process which balances coding efficiency, video quality and computation performance. It is also desired to take advantage of the skip mode to bypass the encoding process of the MB under certain conditions, such as when the MB is part of a large moving object.